import request from '@/utils/request'

// 查询业务-班次管理列表
export function listShiftMgmt(query) {
  return request({
    url: '/business/shiftMgmt/list',
    method: 'get',
    params: query
  })
}

// 查询业务-班次管理详细
export function getShiftMgmt(id) {
  return request({
    url: '/business/shiftMgmt/' + id,
    method: 'get'
  })
}

// 新增业务-班次管理
export function addShiftMgmt(data) {
  return request({
    url: '/business/shiftMgmt',
    method: 'post',
    data: data
  })
}

// 修改业务-班次管理
export function updateShiftMgmt(data) {
  return request({
    url: '/business/shiftMgmt',
    method: 'put',
    data: data
  })
}

// 删除业务-班次管理
export function delShiftMgmt(id) {
  return request({
    url: '/business/shiftMgmt/' + id,
    method: 'delete'
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/shiftMgmt/export',
    method: 'post',
    data: data
  })
}

// 刷新缓存
export function refreshCache() {
  return request({
    url: '/business/shiftMgmt/refreshCache',
    method: 'delete'
  })
}

// 状态变更
export function updateChangeStatus(data){
  return request({
    url: '/business/shiftMgmt/changeStatus',
    method: 'put',
    params: data
  })
}
